package com.fengke.cn.yejian11.activity;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.fengke.cn.yejian11.R;
import com.fengke.cn.yejian11.fragment.MainFragment;

public class MainActivity extends AppCompatActivity {
    private MainFragment mainFragment;
    private FragmentManager fragmentManager;
     @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
         fragmentManager=getSupportFragmentManager();
         mainFragment=new MainFragment();
         FragmentTransaction transaction=fragmentManager.beginTransaction();
         transaction.add(R.id.mm,mainFragment);
         transaction.commit();
    }
}
